namespace RiceShop.Models
{
    /// <summary>
    /// Paylinks配置
    /// </summary>
    public class PaylinksConfig
    {
        /// <summary>
        /// 支付宝配置
        /// </summary>
        public AlipayConfig Alipay { get; set; } = new();

        /// <summary>
        /// 微信支付配置
        /// </summary>
        public WeChatPayConfig WeChatPay { get; set; } = new();
    }

    /// <summary>
    /// 支付宝配置
    /// </summary>
    public class AlipayConfig
    {
        /// <summary>
        /// 服务器地址
        /// </summary>
        public string ServerUrl { get; set; } = string.Empty;

        /// <summary>
        /// 应用ID
        /// </summary>
        public string AppId { get; set; } = string.Empty;

        /// <summary>
        /// 应用私钥
        /// </summary>
        public string AppPrivateKey { get; set; } = string.Empty;

        /// <summary>
        /// 应用证书序列号
        /// </summary>
        public string AppCertSN { get; set; } = string.Empty;

        /// <summary>
        /// 支付宝公钥
        /// </summary>
        public string AlipayPublicKey { get; set; } = string.Empty;

        /// <summary>
        /// 支付宝证书序列号
        /// </summary>
        public string AlipayCertSN { get; set; } = string.Empty;

        /// <summary>
        /// 支付宝根证书序列号
        /// </summary>
        public string AlipayRootCertSN { get; set; } = string.Empty;

        /// <summary>
        /// 加密类型
        /// </summary>
        public string EncryptType { get; set; } = string.Empty;

        /// <summary>
        /// 加密密钥
        /// </summary>
        public string EncryptKey { get; set; } = string.Empty;
    }

    /// <summary>
    /// 微信支付配置
    /// </summary>
    public class WeChatPayConfig
    {
        /// <summary>
        /// 服务器地址
        /// </summary>
        public string ServerUrl { get; set; } = string.Empty;

        /// <summary>
        /// 应用ID
        /// </summary>
        public string AppId { get; set; } = string.Empty;

        /// <summary>
        /// 商户号
        /// </summary>
        public string MchId { get; set; } = string.Empty;

        /// <summary>
        /// 商户证书序列号
        /// </summary>
        public string MchSerialNo { get; set; } = string.Empty;

        /// <summary>
        /// 商户私钥
        /// </summary>
        public string MchPrivateKey { get; set; } = string.Empty;

        /// <summary>
        /// 微信支付公钥
        /// </summary>
        public string WeChatPayPublicKey { get; set; } = string.Empty;

        /// <summary>
        /// 微信支付公钥ID
        /// </summary>
        public string WeChatPayPublicKeyId { get; set; } = string.Empty;

        /// <summary>
        /// API V3密钥
        /// </summary>
        public string APIv3Key { get; set; } = string.Empty;
    }
} 